﻿import com.gamemeal.physics.IForce;
import com.gamemeal.physics.Particle;
import com.gamemeal.physics.Point3;

/**
 * @author Colin
 */
class com.gamemeal.physics.PullForce implements IForce {
	private var f:Point3;
	public function PullForce(){
		f = new Point3(0,0,0);
	}
	
	public function setForce(x:Number,y:Number,z:Number){
		f.x = x;
		f.y = y;
		f.z = z;
	}
	
	public function apply(p : Particle, dt : Number) {
		p.f.x += f.x;
		p.f.y += f.y;
		p.f.z += f.z;
		setForce(0,0,0);
	}

}